<%@page import="java.text.SimpleDateFormat"%>
<%@page import="modulo1.cdp.Aula"%>
<%@page import="modulo1.cdp.Matricula"%>
<%@page import="modulo1.cgt.ControleTurmaMatriculaApl"%>
<%@page import="modulo1.cdp.Aluno"%>
<%@page import="modulo1.cdp.Turma"%>
<%@page import="java.util.List"%>
<div class="table" style="border-top:2px solid #f70;">
    <%
        if (request.getParameter("mensagem") != null) {
            out.print("<script>alert(\"" + request.getParameter("mensagem") + "\")</script>");
        }
        List<Aula> lista = (List<Aula>) request.getAttribute("aulas");
    %>
    <br />
    <form method="post" id="evento">
        <input type="hidden" name="evento" value="consultar_aula" />
        <a class="button" style="cursor: pointer;" href="Aula">Voltar</a> 
        Total de aulas: <%=lista.size()%>
        <table class="listing" cellpadding="0" cellspacing="0">
            <tr>
                <th class="first" width="35%">Data</th>                
                <th>Alterar</th>                
            </tr>
            <%
                int bg = 1;                
                SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
                if (lista != null) {
                    for (int i = 0; i < lista.size(); i++) {
            %>
            <tr <%=(bg == 1) ? "class=\"bg\"" : ""%>>
                <td class="first style1"><%=sdf.format(lista.get(i).getData())%></td>
                <td><a href="Aula?evento=alterar_presenca&id_aula=<%=lista.get(i).getId()%>&id_turma=<%=request.getParameter("id_turma")%>"><img src="img/admin-template/edit-icon.gif" width="16" height="16" alt="" /></a></td>                
            </tr>
            <% }
                }%>
        </table>
        <p>&nbsp;</p>  
    </form>
</div>      

